package com.factory.rental.repository;

import com.factory.rental.model.Room;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface RoomRepository extends JpaRepository<Room, Long> {
    Optional<Room> findByRoomNumber(String roomNumber);
    List<Room> findByBuilding(String building);
    List<Room> findByFloor(Integer floor);
    List<Room> findByStatus(Room.RoomStatus status);
    List<Room> findByLayout(String layout);
}